#include<bits/stdc++.h>
using namespace std;
int r[100005];
int a[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>r[i];
    }
    sort(r+1,r+n+1);
    for(int i=1;i<=n;i++){
        a[i]=a[i-1];
        if(r[i]>r[i-1])a[i]=i-1;
    }
    int t=0;
    int x=n;
    for(int i=2;i<=x;i++){
        if(a[i]-t>=1)n--,t++;
    }
    cout<<n;
    return 0;
}
